{extend name="base" /}
{block name="body"}
<div class="layui-card">
    <div class="layui-card-body">
        <blockquote class="layui-elem-quote">
            <button class="layui-btn layui-btn-sm layui-btn-warm ajax-status" data-title="{$Think.lang.down}" data-url="{:url('down')}"><i class="fa fa-download"></i> {$Think.lang.down}</button>
            
            下载<span class="text-danger"> 未发货 </span>订单，批量发货
        </blockquote>
        <form action="{:request()->url()}" class="layui-form" method="post">
            <div class="layui-form-item layui-form-text">
              <label class="layui-form-label"></label>
              <div class="layui-input-inline">
                <button type="button" class="layui-btn layui-btn-primary" id="test4"><i class="layui-icon"></i>上传订单</button>
              </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-filter="i" lay-submit="">发货</button>
                </div>
            </div>
        </form>
    </div>
</div>
{/block}
{block name="js"}
<script type="text/javascript">
layui.use(['upload', 'element', 'layer'], function(){
  var $ = layui.jquery
  ,upload = layui.upload
  ,element = layui.element
  ,layer = layui.layer;

  upload.render({ //允许上传的文件后缀
    elem: '#test4'
    ,url: '' //此处配置你自己的上传接口即可
    ,accept: 'file' //普通文件
    ,exts: 'xlsx|xls|csv' //只允许上传excel文件
    ,done: function(res){
      layer.msg('上传成功');
      console.log(res)
    }
  });

});
</script>
{/block}
